﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace KFC.MonAnF
{
    public partial class QLMonAnF : Form
    {
        ServiceReferenceKFC.Service1SoapClient client = 
            new ServiceReferenceKFC.Service1SoapClient();
        List<MonAn> danhSachMonAn = new List<MonAn>();

        public QLMonAnF()
        {
            InitializeComponent();
            MonAnFactory monAnFactory = new MonAnFactory();
            danhSachMonAn = monAnFactory.LayDSMonAn();
            for (int i = 0; i < danhSachMonAn.Count; i++)
            {
                ListViewItem lvi = new ListViewItem(danhSachMonAn[i].TenMonAn);
                lvi.SubItems.Add(danhSachMonAn[i].DonGia.ToString());
                lvi.SubItems.Add(danhSachMonAn[i].ChiTietMonAn);
                listViewMonAn.Items.Add(lvi);
                listViewMonAn.Items.Add(danhSachMonAn[i].TenMonAn);
            }

        }

        private void QLMonAnF_Load(object sender, EventArgs e)
        {
            
        }

        private void btnThem_Click(object sender, EventArgs e)
        {

        }
    }
}
